<template>
  <tm-app>
    <tm-sheet :padding="['0']" class="overflow mt-n20">
      <tm-cell
        :bottomBorderInsert="true"
        :card="false"
        title="中文"
        @click="onChangeLocal('zh-Hans')"
      ></tm-cell>
      <tm-cell
        :bottomBorderInsert="true"
        :card="false"
        title="English"
        @click="onChangeLocal('en')"
      ></tm-cell>
    </tm-sheet>
    <tm-sheet :padding="['0']" class="overflow mt-n20">
      <tm-cell
        :bottomBorderInsert="true"
        :card="false"
        url="/pages/sellCard/index"
        :title="$trans('pages.sellCard.navigationBarTitleText')"
      ></tm-cell>
      <tm-cell
        :bottomBorderInsert="true"
        :card="false"
        url="/pages/index/index"
        :title="$trans('pages.index.navigationBarTitleText')"
        ></tm-cell>
        <tm-cell
        :bottomBorderInsert="true"
        :card="false"
        url="/pages/login/index"
        :title="$trans('pages.login.navigationBarTitleText')"
        ></tm-cell>
        <tm-cell
        :bottomBorderInsert="true"
        :card="false"
        url="/pages/resetPsd/index"
        :title="$trans('pages.resetPsd.navigationBarTitleText')"
      ></tm-cell>
        <tm-cell
        :bottomBorderInsert="true"
        :card="false"
        url="/pages/register/index"
        :title="$trans('pages.register.navigationBarTitleText')"
      ></tm-cell>
    </tm-sheet>
  </tm-app>
</template>

<script lang="ts" setup>
import { translate } from "@/locale"
const onChangeLocal = (langs) => {
  uni.setLocale(langs)
  uni.showToast({
    title: `${translate("common.switchLocale")}:${langs}`,
    icon: "success",
  })
}
</script>

<style lang="less"></style>
